﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using TFXK.Model;
using TFXK.BLL;
using TFXK.Common;
using log4net;

public partial class admin_UserManage_Detial : BasePage
{
    private static readonly ILog log = LogManager.GetLogger(typeof(admin_UserManage_Detial));
    private static readonly UsersBLL bll = new UsersBLL();

    #region 加载
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                int id = int.Parse(Request.QueryString["id"].ToString());
                InitData(id);
            }
        }
        catch (Exception ex)
        {
            log.Error(ex.Message);
            Response.Redirect("Default.aspx");
        }

    }
    #endregion


    #region 绑定
    private void InitData(int id)
    {
        Users model = bll.GetModel(id);
        if (model != null)
        {
            lblEmail.Text = model.email;
            this.lblTel.Text = model.telephone;
            this.lblTureName.Text = model.trueName;
            lblUserName.Text = model.userName;
            lblState.Text = model.state == 0 ? "未审核" : "已审核";
        }
    }
    #endregion


    #region 返回
    protected void btnBack_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default.aspx");
    }
    #endregion
}
